﻿// Copyright (c) 2011 Vratislav Cermak (vratacermak@gmail.com)
//  
// This file is part of SrtSync Project. See http://code.google.com/p/srtsync/ for more information.
//  
// SrtSync is an open source project. Using of SrtSync is free of charge.
// It is distributed under GNU General Public License version 3 (GPLv3).
// GPLv3 can be found at http://www.gnu.org/licenses/gpl.html.
//  
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the license for more details.

using System.Collections.Generic;
using System.Text;
using SrtSync.Core.Notifications;

namespace SrtSync.Core.Framework
{
    public interface IEditor : IObservable<EditorModelNotification>
    {
        Encoding Encoding { get; set; }

        IEnumerable<Entry> Entries { get; }

        string Path { get; set; }

        bool Empty { get; }

        bool Modified { get; }

        void Load(string path);

        void Save();

        void SaveAs(string path);

        void SaveCopy(string path);

        void Close();

        void Delete(IEnumerable<Entry> entries);

        void Merge(IEnumerable<Entry> entries);

        void Replace(IEnumerable<Entry> oldEntries, IEnumerable<Entry> newEntries);

        void Reload();
    }
}